package cn.lbwfree.day3_20;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @date:2020年3月20日
 * @author:lbwfree
 * @number:BASIC-29
 */
 
// BASIC-29 高精度加法
public class high_precison_addition {
	public static void main(String[] args) {
		// 输入
		
		Scanner inScanner = new Scanner(System.in);
		int limit = 101;
		String[] tempStrings = new String[2]; 
		int[] a = new int[limit]; // 输入 a
		int[] b = new int[limit]; // 输入 b
		int[] c = new int[limit]; // 结果 c
		int[] temp = new int[2];
		tempStrings[0] = inScanner.next();
		tempStrings[1] = inScanner.next();
		char[] tempChars = tempStrings[0].toCharArray();
		for (int i = 0; i < tempChars.length; i++) {
			a[tempChars.length-1-i]= tempChars[i]-48;
		}
		temp[0]=tempChars.length;
		tempChars = tempStrings[1].toCharArray();
		for (int i = 0; i < tempChars.length; i++) {
			b[tempChars.length-1-i]= tempChars[i]-48;
		}
		temp[1]=tempChars.length;
		// 运算
		int i=0;
		int carry =0; // 进位
		int t=temp[0]>temp[1]?temp[0]:temp[1];
		while(true) {
			if((a[i]!=0)||(b[i]!=0)||(carry!=0)||(i<=t-1))
			{
				c[i]=a[i]+b[i]+carry;
				carry =c[i]/10;
				c[i] %= 10;
				i++;
			}
			else {
				break;
			}
		}
		for(int j=0; j<i; j++) {
			System.out.print(c[i-j-1]);
		}
		
	
	}
}
